METHOD:  Date::toGMTString

object.toGMTString( )

This method converts a local date to Greenwich Mean Time.

The following code uses the toGMTString method to convert the date set in the myDate object to Greenwich Mean Time and returns this date as a string.

Code:
myDate = new Date()
document.write(myDate.toGMTString())

Output:
Fri, 29 Oct 1999 16:28:58 UTC

Copyright 2000 by Infinite Software Solutions, Inc.
Trademark Information